package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTipoGestion generated by hbm2java
 */
@Entity
@Table(name = "TB_TIPO_GESTION", schema = "CATALOGOS")
public class TbTipoGestion implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cgestion;
	private String cusuario;
	private String dgestion;
	private Integer bstatus;
	private Date fhingreso;
	private Set<TbTramite> tbTramites = new HashSet<TbTramite>(0);

	public TbTipoGestion() {
	}

	public TbTipoGestion(String cgestion, String cusuario, String dgestion,
			Integer bstatus, Date fhingreso) {
		this.cgestion = cgestion;
		this.cusuario = cusuario;
		this.dgestion = dgestion;
		this.bstatus = bstatus;
		this.fhingreso = fhingreso;
	}

	public TbTipoGestion(String cgestion, String cusuario, String dgestion,
			Integer bstatus, Date fhingreso, Set<TbTramite> tbTramites) {
		this.cgestion = cgestion;
		this.cusuario = cusuario;
		this.dgestion = dgestion;
		this.bstatus = bstatus;
		this.fhingreso = fhingreso;
		this.tbTramites = tbTramites;
	}

	@Id
	@Column(name = "C_GESTION", unique = true, nullable = false, length = 1)
	public String getCgestion() {
		return this.cgestion;
	}

	public void setCgestion(String cgestion) {
		this.cgestion = cgestion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "D_GESTION", nullable = false, length = 30)
	public String getDgestion() {
		return this.dgestion;
	}

	public void setDgestion(String dgestion) {
		this.dgestion = dgestion;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbTipoGestion")
	public Set<TbTramite> getTbTramites() {
		return this.tbTramites;
	}

	public void setTbTramites(Set<TbTramite> tbTramites) {
		this.tbTramites = tbTramites;
	}

}
